#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
#include <QMouseEvent>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
    , total(0)
{
    ui->setupUi(this);
    //this->setMouseTracking(true);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::wheelEvent(QWheelEvent *event)
{
    total += event->delta();
    qDebug() << total;
}

//void Widget::mouseMoveEvent(QMouseEvent *event)
//{
//    qDebug() << event->x() << "," << event->y();
//}

